﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincenter/AdminPage.master" AutoEventWireup="true"
    CodeFile="PostsManager.aspx.cs" Inherits="admincenter_PostsManager" %>
<%@ Import Namespace="AppCommon" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Post Manager | <%= Constants.S_TITLE_ADMIN %></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!-- Show data -->
    <div class="row">
        <div class="col-lg-12">
            <h1>Post Manager</h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-dashboard"></i>  Bảng điều khiển</li>
                <li class="active"><i class="fa fa-table"></i>  Post Manager</li>
            </ol>
        </div>
        <div class="col-lg-12">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:GridView CssClass="table table-bordered tablesorter" ID="gv" runat="server"
                        CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="10" AllowPaging="true"
                        PagerSettings-Position="TopAndBottom" OnPageIndexChanging="gv_PageIndexChanging"
                        PagerSettings-PageButtonCount="5" AllowSorting="true" OnSorting="gv_Sorting"
                        EmptyDataText="Chưa cập nhật dữ liệu" AutoGenerateColumns="False">
                        <Columns>
                            <asp:TemplateField HeaderText="Edit / Delete">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/admincenter/EditPost.aspx?" + "Id=" + Eval("Id") %>'><i class="fa fa-edit"></i></asp:HyperLink> / 
                                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "~/admincenter/DeletePost.aspx?" + "Id=" + Eval("Id") %>'><i class="fa fa-eraser"></i></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                            
                        <Columns>                            
                            <asp:BoundField DataField="Id" HeaderText="Id"/>
                            <asp:BoundField DataField="Title" HeaderText="Title"/>
                            <asp:BoundField DataField="IdCategory" HeaderText="IdCategory"/>
                            <asp:BoundField DataField="Description" HeaderText="Description"/>                            
                            <asp:BoundField DataField="LastUpdatedBy" HeaderText="LastUpdatedBy"/>
                            <asp:BoundField DataField="LastDateUpdated" HeaderText="LastDateUpdated"/>                            
                            <asp:CheckBoxField DataField="Status" HeaderText="Status"/>
                        </Columns>                                                
                        <AlternatingRowStyle BackColor="White" />
                        <FooterStyle BackColor="#d02027" Font-Bold="True" ForeColor="Black" />
                        <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle CssClass="phan-trang" BackColor="#428bca" ForeColor="#ffffff" HorizontalAlign="Center" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" VerticalAlign="Middle" Wrap="True" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <PagerSettings Mode="NumericFirstLast"></PagerSettings>
                    </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
